home *** CD-ROM | disk | FTP | other *** search
- Path: gail.ripco.com!mambuhl
- From: mambuhl@ripco.com (Martin Ambuhl)
- Newsgroups: comp.lang.c
- Subject: Re: Can someone tell me w
- Date: 19 Feb 1996 18:53:54 GMT
- Organization: Ripco Communications, Inc.
- Message-ID: <4gah02$6ci@gail.ripco.com>
- NNTP-Posting-Host: foley.ripco.com
-
- atk@mathcs.emory.edu (Alan Krantz)
- in <4g27n5$qa4@solutions.solon.com> asks:
-
-
- >I know the following is illegal but I would really really like to know
- >why C can't support the following construct:
-
- >typedef struct _mytbl {
- > char *str; ; Leagal
- > int *data; ; Illegal (see below)
- >} mytbl[] = {"Not Defined", {0},
- > "Square", {1,2,3,4,0},
- > "Circle", {1,2,0},
- >}
-
- Among other things, because you are attempting to declare mytbl[] as the
- name of a type or to use typedef to define an object mytbl. `typedef'
- statements are not used to declare objects.
-
- --
- * Martin Ambuhl net: mambuhl@ripco.com
- * Chicago, IL (USA)
-